package com.realgodo.site.web.user.friend;

import java.util.List;

import org.springframework.context.annotation.Scope;

import com.realgodo.site.entity.relation.FriendConfig;
import com.realgodo.site.entity.relation.Relation;

@Scope("prototype")
public class NavController extends IndexController{

	/***/
	private static final long serialVersionUID = -7374873911630621647L;
	
	
	@Override
	public String execute() throws Exception {
		return getNavFriend();
	}
	
	public String getNavFriend(){
		super.getParamMap().put("spaceId", super.getSpace().getId().toString());
		super.getParamMap().put("status", String.valueOf(Relation.STATUS_AGREE));
		super.friendConfigList=friendCinfigManager.find(super.getParamMap());
		return SUCCESS;
	}
	/**展示首页顶级朋友*/
	public String top(){
		super.getParamMap().put("spaceId", super.getSpace().getId().toString());
		super.getParamMap().put("status", String.valueOf(Relation.STATUS_AGREE));
		super.getParamMap().put("isTop", String.valueOf(FriendConfig.IS));
		super.friendConfigList=friendCinfigManager.find(super.getParamMap());
		return SUCCESS;
	}
	
	public List<FriendConfig> getFriendConfigList() {
		return friendConfigList;
	}

}
